package com.demo.spring.annoinit;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App2 {

	public static void main(String[] args) {
        // 用我们的配置文件来启动一个 ApplicationContext
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);
        System.out.println("context 启动成功");

        PersonService personService = context.getBean(PersonService.class);
        personService.say();
    }

}
